LtU Forum, Site Discussion

New Fortress Specification

I was just doing a search for the Fortress language specification that Sun's working on, and found that they released a new version of the specification (version 0.707) a couple of days ago.

I haven't read over it in much detail, but I've noticed that they made some changes to their interesting "do what I mean" unit manipulation fixups. For example, one of their samples that I questioned before now reads:

w: radian/s := 2 pi radian / 226 million year in s

Of course, parsing this the way they intend breaks a lot of normal mathematical precedence rules, and violates the recommendations of the SI. I'd sure like for them to list the rules that they use to "do what I mean" and perform "context-sensitive disambiguation." In my opinion, such things are equivalent to reading minds. And can "in" also mean "inches"? What's "3 in in in?" Or "1 foot^2 in in in?" Or, equivalently, "144 in in in in in"? Hmmm... It's still my bet that the final language will have to follow normal precedence rules more closely, because these "fixups" tend to paint you into an indefensible, surprising, and ugly corner, and they punish those who understand and write normal mathematical notation perfectly in favor of the dumber people who might make mistakes. I've taken the tactic of "err on the side of being pedantic, and try to teach correct, unambiguous usage" in my Frink language.

As an example, a friend just pointed me to the following scary differences in the Google calculator, which gives results not even having the same dimensions:

1/2 seconds
-1/2 seconds

Try these. Gah! Also see the Frink FAQ about this issue.

Concrete Parse Tree to AST

I parse some language (let's say MS Excel formulas), and I got a concrete parse tree. Are there any specific algorithms to convert it to AST? Are any methods or technics around? Or it is better (faster? simplier?) to build AST directly? Any information is highly appreciated.
Thanks.

GoF get SIGPLAN award

ACM SIGPLAN has given the 2005 Programming Languages Achievement Award to Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, authors of Design Patterns.

More on the "generics are evil" meme

Bruce Eckel, famous author of programming books Thinking in Java and Thinking in C++, writes some commentary about Arnold's article on generics (discussed here on LtU):

Ken Arnold just posted a blog entry describing how difficult he found generics when working on the upcoming edition of The Java Programming Language book.

The fact that it's taken this book so long to get published is just one indicator of the complexity of the language. I've also noticed that most other Java books have either taken a long time, or just briefly glossed over generics, and often both.

[...]

One commenter to Ken's blog points out that it's not the idea of generics that is the problem, but the implementation, to which I agree, and I also think this is what Ken actually meant.

Here Eckel seems to agree with many opinions expressed in the previous discussion: that's not a problem with generics in general, but with the Java implementation. And he argues that it would be better if the language was designed with generics in mind in the first place, which I don't think anyone would disagree with.

But the question is, how can we change the course of a moving train? It seems to be never easy. Can PL theory help the evolution of programming systems and not only their design?

Deleting my Post

Can I delete a post I made on the other forum?

I want to do this because I can't format it right.
Only about a quarter of the text shows, and it stops mid-phrase.

R.K.

A question about subtypes inference

Hi

I am looking for information on subtype inference.

Consider a type system with a sub rule:

E,C|- e:sigma C|-sigma :sigma'
----------------------------------------
E,C|- e:sigma'

Here E is the type environment and C is the (initially empty) subtype constraint set.
And I use : to denote the smaller than relation on types for lack of a better symbol.

And a set of rules for infering constrainst from sigma:sigma' depending on the underlying type of sigma. (it is a structural type system).

My question is, after my type inference assigns type sigma’ to e, how do I choose sigma’, as to find the correct underlying constraints.

I looked and asked around. Some suggested using a copy of sigma, I find this odd because I don’t see why, and how this would produce the needed type constraints.

I would be grateful for either a article explaining this matter or pointers to the underlying idea.

R.K.

BTW this is the article I’m working on
http://citeseer.ist.psu.edu/cache/papers/cs/18011/http:zSzzSzresearch.microsoft.comzSz~mafzSzpopl01.pdf/rehof01typebased.pdf

CTM Author American University Tour

Edit: Woops, didn't realize that this news had already been posted! Guess I should read the front page once in a while...

Please feel free to check out the real article.



Hello Everyone,
I recently heard the following message in the Mozart/Oz newsgroup, and thought I should pass it on to all the CTM fans on this site:

From: Peter Vay Roy To: users@mozart-oz.org

Dear all,

During the week of Nov. 7, I am planning to tour American
universities that teach or are thinking of teaching with our
programming textbook.  If you are in the US and you would
like me to visit your institution, please send me email.

Peter

Language support for generating functions?

We've got languages with support for iterators and lazy lists and other sequence oriented structures. Is there any language with built in support for generating functions? I don't have any immediate application in mind, I'm just curious as to what could be possible.

XML feed